# -*- coding: utf-8 -*-
'''
@author: Hugo
@file: mq_老师代码.py
@time: 2021/8/25 17:57
'''
# encoding: utf-8
"""
@author: 夏洛
@QQ: 1972386194
@file: mq.py
"""

'''
数据是js 加载的

有接口的


https://vipapi.qimingpian.cn/DataList/investmentTotalVip   入口
post 方式
time_interval=&industry=&page=1&num=20&unionid=


'''

import execjs

headers = {
    'user-agent':'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'
}

import httpx

base_url = 'https://vipapi.qimingpian.cn/DataList/investmentTotalVip'
data = {
    'time_interval':'',
    'industry':'',
    'page':'1',
    'num':'20',
    'unionid':''}

res = httpx.post(url=base_url,headers=headers,data=data, verify=False)

res_data = res.json().get('encrypt_data')

f = open('mq.js','r').read()
ctx = execjs.compile(f)
restult = ctx.call('o',res_data)
print(restult)






'''
后端加密数据
解密 ？ 需要  JS
'''







